package cn.njupt.map;

public interface Map<K,V> {
    public abstract int size();

    public abstract boolean isEmpty();

    public abstract void clear();

    public abstract V put(K key,V value);

    public abstract V get(K key);

    public abstract V remove(K key);

    public abstract boolean containsKey(K key);

    public abstract boolean containsValue(V value);

    public abstract void traversal(Visitor<K,V> visitor);

    public abstract static class Visitor<K,V>{
        boolean stop;
        public abstract boolean visitor(K key,V value);
    }
}
